package com.hrm.service.hao;

import com.hrm.dao.hao.JobMapper;
import com.hrm.entity.Job;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Jobservicelmpl implements JobService {


    @Autowired
    JobMapper jobMapper;


    @Override
    public int addjob(Job job) {
        return jobMapper.insertjob(job);
    }

    @Override
    public List<Job> selectjoblist(String name) {
        return jobMapper.selectjoblist(name);
    }

    /**
     * 通过id删除一个职位
     *
     * @param id
     * @return int
     */
    @Override
    public int deletejobById(Integer id) {
        return jobMapper.deletejobById(id);
    }

    /**
     * 修改职位信息
     *
     * @param job
     * @return int
     */
    @Override
    public int update(Job job) {
        return jobMapper.update(job);
    }
}
